from Tool import Tool
import unittest

if __name__ == '__main__':
    Tool.Log()
    suite=unittest.defaultTestLoader.discover(start_dir=r'D:\gao1\PythonProject6\TestCase',pattern='TestCase.py')
    Tool.Report().run(suite)
    Tool.Email()

























# import time
# import unittest
# from Poyk_0905.Page import Page1
# from Poyk_0905.Page2 import Page2
# from selenium import webdriver
# import yaml,logging
# from ddt import ddt,file_data
#
# @ddt()
# class Jiuxian(unittest.TestCase):
#
#     def setUp(self)->None:
#         self.driver=webdriver.Edge()
#         self.driver.maximize_window()
#
#     def tearDown(self)->None:
#         time.sleep(3)
#         self.driver.quit()
#     @file_data(r'D:\gao1\PythonProject4\Poyk_0905\yamljiuxian.yaml')
#     def luoji_jiuxian_login(self,username,password):
#         logging.info('---------start case-----------')
#         po=Page1(self.driver)
#         # po.luoji_jiuxian_login(username=username,password=password)
#         po.open_url('https://www.jiuxian.com/')
#         time.sleep(5)
#         po.login()
#         po.username(username)
#         # time.sleep(8)
#         # po.dy()
#         # assert "账号登录" == po.dy()
#         po.password(password)
#         po.loginan()
#         logging.info('---------start case-----------')
#     def luoji_jiuxian_sousuo(self):
#         po = Page2(self.driver)
#         po.open_url('https://www.jiuxian.com/')
#         po.luoji_jiuxian_sousuo()